<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * 系统信息
 */
class Config_mdl extends MY_Model {

    public function __construct() {
        parent::__construct();
        $this->table = 'config';
    }

    // 查询单个数据
    public function get_one(){
        return $this->db->get($this->table)->row();
    }

    //设置session
    public function set_sess(){
        if(! $this->session->config){
            $this->db->where('id',1);
            $res = $this->get_one();
            $this->session->set_userdata('config',$res);
        }
    }

}

/* End of file Config_mdl.php */
/* Location: ./application/models/Config_mdl.php */